package com.hsy.swu.roomdb

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.hsy.swu.home.textbook.TextbookModel

@Dao
interface TextbookDao {
    @Insert
    fun insertAll(textbookList: List<TextbookModel>)

    @Query("DELETE FROM TextbookModel")
    fun deleteAll()

    @Query("SELECT * FROM TextbookModel")
    fun getAll(): List<TextbookModel>

    @Query("SELECT * FROM TextbookModel WHERE textBookName != '无教材'")
    fun getAllNeedTextbook(): List<TextbookModel>
}